package a.f.l;

import a.c.ab;
import a.c.d;
import a.c.e;
import a.c.j;
import a.c.m;
import a.c.q;
import a.c.v;
import a.c.x;
import a.d.t;
import a.f.*;
import a.f.hb;
import a.i.db;

import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.util.*;

import a.f.l.r;
import a.d.t;
import a.f.l.bb;
import a.f.l.p;

public class b
  extends a.f.r
{
  static final boolean g = false;
  public static final byte h = 0;
  public static final byte i = 1;
  public static final Object j = "y.layout.router.BusRouter.EDGE_DESCRIPTOR_DPKEY";
  public static final Object k = "y.layout.router.BusRouter.EDGE_SUBSET_DPKEY";
  private static final String l = "y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY";
  private static final int[] m = { 1, 4, 2, 8 };
  static final String n = "y.layout.router.BusRouter.DEBUG_INFO_DPKEY";
  static final int o = 1;
  static final int p = 3;
  static final double q = Math.pow(0.1D, 4.0D);
  private final bb r = new bb(this);
  private final g s = b();
  private final vc t = new f(new l(new k(this.s)));
  private final p u;
  final b_ v;
  private boolean w = true;
  private byte x = 0;
  private Object y = k;
  private int z = 0;
  private boolean A;
  private boolean B;
  public static int C;
  
  public b()
  {
    this.r.a(100.0D);
    this.r.a(2);
    this.r.a(false);
    this.u = new p(this.t);
    this.u.a(150.0D);
    this.u.a(3);
    this.u.b(this.r.c());
    this.v = new b_();
    this.A = true;
    this.B = false;
  }
  
  protected g b()
  {
    g localg = new g();
    localg.a("AllowRigModification", Boolean.FALSE);
    localg.c((byte)3);
    localg.e(false);
    localg.d(10);
    localg.c(5);
    localg.f(false);
    localg.c(false);
    localg.b(1.0D);
    localg.d(false);
    localg.a(0, 0);
    localg.b(10);
    return localg;
  }
  
  public boolean canLayout(a.f.o paramo)
  {
    int i1 = g.Cc;
    boolean bool = a(d(paramo));
    if ((i1 != 0) || (bool)) {
      if (i1 != 0) {}
    }
    return b(paramo);
  }
  
  private boolean a(d_[] paramArrayOfd_)
  {
    int i4 = g.Cc;
    int i3 = g.Bc;
    int i1 = 0;
    label141:
    label158:
    do
    {
      do
      {
        if (i1 >= paramArrayOfd_.length) {
          break;
        }
        d_ locald_ = paramArrayOfd_[i1];
        m localm = locald_.f();
        do
        {
          if (!localm.e()) {
            break label158;
          }
          a.d.w[] arrayOfw = locald_.d().n(localm.a()).h();
          if (i3 != 0) {
            break;
          }
          int i2 = 1;
          do
          {
            do
            {
              if (i2 >= arrayOfw.length) {
                break label141;
              }
              a.d.w localw1 = arrayOfw[(i2 - 1)];
              a.d.w localw2 = arrayOfw[i2];
              if (i3 != 0) {
                break;
              }
              if (!a(localw1.a, localw2.a))
              {
                if (i4 != 0) {
                  continue;
                }
                if (!a(localw1.b, localw2.b)) {
                  return false;
                }
              }
              i2++;
            } while (i3 == 0);
            localm.f();
          } while (i4 != 0);
        } while (i3 == 0);
        i1++;
      } while (i4 != 0);
    } while (i3 == 0);
    return true;
  }
  
  public void doLayout(a.f.o paramo)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    a(paramo);
    d_[] arrayOfd_ = d(paramo);
    if (!a(arrayOfd_)) {
      throw new IllegalArgumentException("Method canLayout() returned false. Please check the layout requirements.");
    }
    a.i.y localy = new a.i.y(paramo);
    ab localab = new ab();
    int i1 = 0;
    if (i1 < arrayOfd_.length) {}
    do
    {
      localab.a(arrayOfd_[i1].g());
      i1++;
      if (i3 != 0) {
        break label118;
      }
      if (i2 != 0) {
        break label117;
      }
      if (i2 == 0) {
        break;
      }
      localy.a(localab);
    } while (i3 != 0);
    localab = new ab();
    try
    {
      label117:
      label118:
      i1 = 0;
      label244:
      do
      {
        if (i1 >= arrayOfd_.length) {
          break;
        }
        d_ locald_ = arrayOfd_[i1];
        if ((i3 == 0) && (i2 != 0)) {
          break label269;
        }
        if ((i3 != 0) || (locald_.j().size() != 0))
        {
          if (i3 == 0)
          {
            if (locald_.e().k() == 1) {
              if (i3 != 0) {
                continue;
              }
            }
          }
          else
          {
            if (locald_.g().k() != 1) {
              break label244;
            }
            localab.add(locald_.e().a());
            if (i3 != 0) {
              continue;
            }
            if (i2 == 0) {
              break label244;
            }
          }
          this.v.a(locald_);
          a(locald_, localy);
        }
        i1++;
      } while (i2 == 0);
      a(paramo, localab, localy);
      if (i3 != 0) {}
    }
    finally
    {
      label269:
      localy.g();
    }
    c(paramo);
    this.z = 0;
  }
  
  private void a(d_ paramd_, a.i.y paramy)
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    a.f.o localo = paramd_.d();
    if (i5 == 0) {}
    int i1 = paramd_.f.size() > 0 ? 1 : 0;
    List[] arrayOfList = new List[0];
    if (i5 == 0)
    {
      if (i1 != 0) {
        arrayOfList = a(paramd_);
      }
    }
    else if ((i5 != 0) || (arrayOfList[0].isEmpty())) {
      if (i5 == 0)
      {
        if (arrayOfList[1].isEmpty())
        {
          paramd_.a();
          i1 = 0;
        }
      }
      else {
        arrayOfList = new List[0];
      }
    }
    a.c.z localz = new a.c.z();
    List localList;
    if (i1 != 0)
    {
      localList = this.r.a(localo, arrayOfList);
      localObject1 = paramd_.f();
      Object localObject2;
      label245:
      label247:
      do
      {
        do
        {
          if (!((m)localObject1).e()) {
            break label250;
          }
          localObject2 = ((m)localObject1).a();
          localObject3 = b(localo.n((d)localObject2).h());
          if (i4 != 0) {
            break label381;
          }
          int i3 = 1;
          do
          {
            if (i3 >= localObject3.length) {
              break;
            }
            localz.add(new a.d.n(localObject3[(i3 - 1)], localObject3[i3]));
            i3++;
            if (i5 != 0) {
              break label247;
            }
            if (i4 != 0) {
              break label245;
            }
          } while (i4 == 0);
        } while (i5 != 0);
        ((m)localObject1).f();
      } while (i4 == 0);
      label250:
      if (i5 == 0)
      {
        localObject1 = localList.iterator();
        do
        {
          if (!((Iterator)localObject1).hasNext()) {
            break;
          }
          localObject2 = (ob)((Iterator)localObject1).next();
          localObject3 = ((ob)localObject2).b();
          localz.add(new a.d.n(new a.d.w(((kb)localObject3).b(), ((kb)localObject3).c()), new a.d.w(((kb)localObject3).e(), ((kb)localObject3).f())));
          if ((i5 == 0) && (i4 != 0)) {
            break label379;
          }
        } while (i4 == 0);
      }
    }
    else
    {
      localList = this.r.a(localo, paramd_.h());
      paramy.a(paramd_.f());
      label379:
      if (i1 != 0)
      {
        label381:
        int i2 = this.u.b();
        this.u.a(1);
        localObject1 = this.u.a(paramd_, localList);
        if (i5 != 0) {
          break label436;
        }
        this.u.a(i2);
        if (i4 == 0) {
          break label444;
        }
      }
    }
    label436:
    Object localObject1 = this.u.a(paramd_, localList);
    label444:
    ab localab = new ab();
    Object localObject3 = ((a.c.bb)localObject1).l();
    label529:
    label531:
    do
    {
      do
      {
        if (!((a.c.w)localObject3).e()) {
          break label534;
        }
        localObject4 = ((a.c.w)localObject3).d().h();
        do
        {
          if (localObject4 == null) {
            break;
          }
          localab.add(localObject4);
          localObject4 = ((d)localObject4).i();
          if (i5 != 0) {
            break label531;
          }
          if (i4 != 0) {
            break label529;
          }
        } while (i4 == 0);
      } while (i5 != 0);
      ((a.c.w)localObject3).f();
    } while (i4 == 0);
    label534:
    paramy.b(new ab(paramd_.e()));
    localObject3 = s.a(paramd_, localab, localz);
    Object localObject4 = localList.iterator();
    do
    {
      while (i4 == 0)
      {
        if (!((Iterator)localObject4).hasNext()) {
          break;
        }
        localo.a(((ob)((Iterator)localObject4).next()).g());
      }
    } while (i5 != 0);
    localObject4 = ((a.c.bb)localObject1).l();
    do
    {
      do
      {
        if (!((a.c.w)localObject4).e()) {
          break;
        }
        localo.a(((a.c.w)localObject4).d());
        ((a.c.w)localObject4).f();
        if ((i5 == 0) && (i4 != 0)) {
          return;
        }
      } while (i4 == 0);
    } while (i5 != 0);
    if (i5 == 0)
    {
      if (!((ab)localObject3).isEmpty()) {
        a(paramd_, (ab)localObject3);
      }
    }
    else if (this.B) {
      throw new IllegalStateException("Invalid port for edge " + ((ab)localObject3).m());
    }
  }
  
  private void a(a.f.o paramo, ab paramab, a.i.y paramy)
  {
    paramy.b(paramab);
    a.c.n localn = paramo.C();
    a(localn, paramab);
    this.s.f(true);
    this.s.a("AllowRigModification", Boolean.TRUE);
    this.s.b((byte)2);
    this.s.b("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY");
    paramo.a("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY", localn);
    this.t.doLayout(paramo);
    paramo.j("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY");
    this.s.f(false);
    this.s.a("AllowRigModification", Boolean.FALSE);
    paramo.a(localn);
  }
  
  private void a(d_ paramd_, ab paramab)
  {
    a.f.o localo = paramd_.d();
    a.c.n localn = localo.C();
    a(localn, paramab);
    a.i.y localy = new a.i.y(localo);
    localy.a(paramd_.e());
    localy.b(paramab);
    this.s.b((byte)2);
    this.s.b("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY");
    localo.a("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY", localn);
    this.t.doLayout(localo);
    localo.j("y.layout.router.BusRouter.SIMPLE_ROUTING_EDGE_DPKEY");
    localy.g();
    localo.a(localn);
  }
  
  private void c(a.f.o paramo)
  {
    if (!this.w) {
      return;
    }
    a.i.y localy = new a.i.y(paramo);
    localy.d();
    hb localhb = new hb();
    localhb.a(true);
    localhb.doLayout(paramo);
    localy.g();
  }
  
  g c()
  {
    return this.s;
  }
  
  private d_[] d(a.f.o paramo)
  {
    if (g.Cc == 0) {
      if (0 == this.x) {
        return a(paramo, paramo.w(), paramo.c(j));
      }
    }
    if (1 == this.x)
    {
      ab localab = new ab(paramo.w(), paramo.c(n()));
      return a(paramo, localab.l(), paramo.c(j));
    }
    throw new IllegalStateException("Scope is not valid: " + this.x);
  }
  
  private List[] a(d_ paramd_)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    s.f_ localf_ = new s.f_();
    double d1 = this.A ? Math.max(0.5D * g(), 2.5D) : 0.0D;
    double d2 = f() + d1;
    a.f.o localo = paramd_.d();
    Object localObject1 = paramd_.f();
    do
    {
      if (!((m)localObject1).e()) {
        break;
      }
      localObject2 = ((m)localObject1).a();
      a.d.w[] arrayOfw = wc.a(localo.e(localObject2), localo.d(((d)localObject2).e()), localo.d(((d)localObject2).f()), d2).h();
      localf_.a(b(arrayOfw));
      ((m)localObject1).f();
      if (i3 != 0) {
        break label163;
      }
      if (i2 != 0) {
        break label162;
      }
    } while (i2 == 0);
    if (i3 == 0) {
      localf_.a();
    }
    label162:
    label163:
    localObject1 = new boolean[] { true, false };
    Object localObject2 = new List[localObject1.length];
    int i1 = 0;
    label335:
    label337:
    do
    {
      if (i1 >= localObject1.length) {
        break;
      }
      List localList = localf_.a(localObject1[i1]);
      if ((i3 == 0) && (i2 != 0)) {
        break label342;
      }
      localObject2[i1] = new ArrayList(localList.size());
      Iterator localIterator = localList.iterator();
      do
      {
        if (!localIterator.hasNext()) {
          break;
        }
        a_ locala_ = (a_)localIterator.next();
        a.d.w localw1 = localf_.c().o(locala_.b());
        a.d.w localw2 = localf_.c().o(locala_.d());
        localObject2[i1].add(a(localw1, localw2, d1));
        if (i3 != 0) {
          break label337;
        }
        if (i2 != 0) {
          break label335;
        }
      } while (i2 == 0);
      if (i3 == 0) {
        i1++;
      }
    } while (i2 == 0);
    label342:
    return localObject2;
  }
  
  public void a(int paramInt)
  {
    this.s.b(paramInt);
  }
  
  public int d()
  {
    return this.s.J();
  }
  
  public void a(boolean paramBoolean)
  {
    this.s.d(paramBoolean);
  }
  
  public boolean e()
  {
    return this.s.H();
  }
  
  public void b(int paramInt)
  {
    this.s.d(paramInt);
  }
  
  public int f()
  {
    return this.s.M();
  }
  
  public void c(int paramInt)
  {
    this.s.c(paramInt);
  }
  
  public int g()
  {
    return this.s.K();
  }
  
  public void a(double paramDouble)
  {
    this.s.b(paramDouble);
  }
  
  public double h()
  {
    return this.s.u();
  }
  
  public void b(boolean paramBoolean)
  {
    this.s.c(paramBoolean);
  }
  
  public boolean i()
  {
    return this.s.v();
  }
  
  public int j()
  {
    return this.r.a();
  }
  
  public void d(int paramInt)
  {
    this.r.a(paramInt);
  }
  
  public double k()
  {
    return this.r.c();
  }
  
  public void b(double paramDouble)
  {
    this.r.a(paramDouble);
    this.u.b(this.r.c());
  }
  
  public int l()
  {
    return this.u.b();
  }
  
  public void e(int paramInt)
  {
    this.u.a(paramInt);
  }
  
  public boolean m()
  {
    return this.w;
  }
  
  public void c(boolean paramBoolean)
  {
    this.w = paramBoolean;
  }
  
  public Object n()
  {
    return this.y;
  }
  
  public void a(Object paramObject)
  {
    if (paramObject == null) {
      throw new IllegalArgumentException("null");
    }
    this.y = paramObject;
  }
  
  public byte o()
  {
    return this.x;
  }
  
  public void a(byte paramByte)
  {
    this.x = paramByte;
  }
  
  public boolean a(String paramString, Object paramObject)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    boolean bool = false;
    if (i2 == 0) {
      if ("CenterPC".equals(paramString))
      {
        if (i2 != 0) {
          break label260;
        }
        if (!(paramObject instanceof Boolean)) {
          return bool;
        }
        this.v.a = ((Boolean)paramObject).booleanValue();
        bool = true;
        if (i2 != 0) {
          break label260;
        }
        if (i1 == 0) {
          return bool;
        }
      }
    }
    if (i2 == 0) {
      if ("EFB".equals(paramString))
      {
        if (i2 != 0) {
          break label260;
        }
        if (!(paramObject instanceof Boolean)) {
          return bool;
        }
        this.A = ((Boolean)paramObject).booleanValue();
        bool = true;
        if (i2 != 0) {
          break label260;
        }
        if (i1 == 0) {
          return bool;
        }
      }
    }
    if (i2 == 0) {
      if ("MinTLCount".equals(paramString))
      {
        if (i2 != 0) {
          break label260;
        }
        if (!(paramObject instanceof Integer)) {
          return bool;
        }
        this.v.c = ((Integer)paramObject).intValue();
        bool = true;
        if (i2 != 0) {
          break label260;
        }
        if (i1 == 0) {
          return bool;
        }
      }
    }
    if (i2 == 0) {
      if ("ReportAllErrors".equals(paramString))
      {
        if (i2 != 0) {
          break label260;
        }
        if (!(paramObject instanceof Boolean)) {
          return bool;
        }
        this.B = ((Boolean)paramObject).booleanValue();
        bool = true;
        if (i2 != 0) {
          break label260;
        }
        if (i1 == 0) {
          return bool;
        }
      }
    }
    if (i2 == 0) {
      if ("TLMultiplicity".equals(paramString))
      {
        if (i2 != 0) {
          break label260;
        }
        if ((paramObject instanceof Integer))
        {
          this.v.e = ((Integer)paramObject).intValue();
          bool = true;
        }
      }
    }
    label260:
    return bool;
  }
  
  static d_[] a(a.f.o paramo, m paramm, a.c.k paramk)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    HashMap localHashMap = new HashMap();
    paramm.h();
    label91:
    do
    {
      if (!paramm.e()) {
        break;
      }
      localObject = paramm.a();
      if ((i2 != 0) || (paramk != null)) {
        if (i2 != 0) {
          break label91;
        }
      }
      r localr = paramk.get(localObject) == null ? new r(new Object()) : (r)paramk.get(localObject);
      d_ locald_;
      if ((i2 != 0) || (localHashMap.containsKey(localr.a())))
      {
        locald_ = (d_)localHashMap.get(localr.a());
        if (i2 != 0) {
          continue;
        }
        if (i1 == 0) {}
      }
      else
      {
        locald_ = new d_(paramo, localr.a());
        localHashMap.put(localr.a(), locald_);
      }
      locald_.a((d)localObject, localr);
      paramm.f();
    } while (i1 == 0);
    Object localObject = new ArrayList(localHashMap.values());
    Collections.sort((List)localObject);
    return (d_[])((List)localObject).toArray(new d_[((List)localObject).size()]);
  }
  
  static int a(q paramq)
  {
    if (g.Cc == 0) {
      if (paramq.c("y.layout.router.BusRouter.DEBUG_INFO_DPKEY") == null) {
        return 0;
      }
    }
    return paramq.c("y.layout.router.BusRouter.DEBUG_INFO_DPKEY").getInt("LEVEL");
  }
  
  private static j b(q paramq)
  {
    j localj = (j)paramq.c("y.layout.router.BusRouter.DEBUG_INFO_DPKEY");
    if (g.Cc == 0)
    {
      if (localj == null)
      {
        localj = db.c();
        paramq.a("y.layout.router.BusRouter.DEBUG_INFO_DPKEY", localj);
      }
      localj.a("BACKBONES", new a.c.z());
    }
    return localj;
  }
  
  private static void e(a.f.o paramo)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    j localj = (j)paramo.c("y.layout.router.BusRouter.DEBUG_INFO_DPKEY");
    Collection localCollection = (Collection)localj.get("BACKBONES");
    Iterator localIterator = localCollection.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      kb localkb = (kb)localIterator.next();
      e locale = paramo.i();
      t localt = localkb.h();
      if (i2 == 0)
      {
        if (localt.b() < 5.0D)
        {
          paramo.b(locale, 5.0D, localt.c());
          paramo.c(locale, localt.d() - 2.5D, localt.e());
          if (i2 != 0) {
            continue;
          }
          if (i1 == 0) {}
        }
        else
        {
          paramo.b(locale, localt.b(), 5.0D);
        }
      }
      else {
        paramo.c(locale, localt.d(), localt.e() - 2.5D);
      }
      localj.a(locale, localj.get(localkb));
    } while (i1 == 0);
  }
  
  private static void a(q paramq, List paramList)
  {
    int i1 = g.Bc;
    j localj = (j)paramq.c("y.layout.router.BusRouter.DEBUG_INFO_DPKEY");
    Collection localCollection = (Collection)localj.get("BACKBONES");
    Iterator localIterator = paramList.iterator();
    do
    {
      if (!localIterator.hasNext()) {
        break;
      }
      ob localob = (ob)localIterator.next();
      localCollection.add(localob.b());
      localj.a(localob.b(), localj.get(localob.g()));
    } while (i1 == 0);
  }
  
  static void a(Collection paramCollection, Collection[] paramArrayOfCollection)
  {
    int i2 = g.Bc;
    if (paramArrayOfCollection != null)
    {
      int i1 = 0;
      do
      {
        if (i1 >= paramArrayOfCollection.length) {
          break;
        }
        paramCollection.addAll(paramArrayOfCollection[i1]);
        i1++;
      } while (i2 == 0);
    }
  }
  
  static void a(j paramj, a.c.z paramz)
  {
    int i2 = g.Cc;
    int i1 = g.Bc;
    do
    {
      a.c.y localy = paramz.h();
      while (i1 == 0)
      {
        if (!localy.e()) {
          break;
        }
        paramj.a(localy.j(), true);
        localy.f();
      }
    } while (i2 != 0);
  }
  
  static a.d.w[] a(a.d.w[] paramArrayOfw)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    a.d.w[] arrayOfw = new a.d.w[paramArrayOfw.length];
    do
    {
      for (int i1 = 0; i2 == 0; i1++)
      {
        if (i1 >= paramArrayOfw.length) {
          break;
        }
        if ((i3 == 0) && (i2 != 0)) {
          break label56;
        }
        arrayOfw[(paramArrayOfw.length - 1 - i1)] = paramArrayOfw[i1];
      }
    } while (i3 != 0);
    label56:
    return arrayOfw;
  }
  
  static boolean f(a.f.o paramo)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    m localm = paramo.w();
    label115:
    do
    {
      if (!localm.e()) {
        break;
      }
      a.d.w[] arrayOfw = paramo.n(localm.a()).h();
      if (i2 != 0) {
        break label132;
      }
      int i1 = 1;
      do
      {
        do
        {
          if (i1 >= arrayOfw.length) {
            break label115;
          }
          a.d.w localw1 = arrayOfw[(i1 - 1)];
          a.d.w localw2 = arrayOfw[i1];
          if (i2 != 0) {
            break;
          }
          if (!a(localw1.a, localw2.a))
          {
            if (i3 != 0) {
              continue;
            }
            if (!a(localw1.b, localw2.b)) {
              return false;
            }
          }
          i1++;
        } while (i2 == 0);
        localm.f();
      } while (i3 != 0);
    } while (i2 == 0);
    label132:
    return true;
  }
  
  static boolean a(double paramDouble1, double paramDouble2)
  {
    if (g.Cc == 0) {}
    return Math.abs(paramDouble1 - paramDouble2) < q;
  }
  
  static int b(double paramDouble1, double paramDouble2)
  {
    return new Double(paramDouble1).compareTo(new Double(paramDouble2));
  }
  
  static double c(double paramDouble)
  {
    return fb.a(paramDouble, 1);
  }
  
  static double d(double paramDouble)
  {
    return fb.b(paramDouble, 1);
  }
  
  static double e(double paramDouble)
  {
    return fb.d(paramDouble, 1);
  }
  
  static double f(double paramDouble)
  {
    return fb.d(paramDouble, 3);
  }
  
  static a.d.w a(a.d.w paramw)
  {
    return new a.d.w(f(paramw.a), f(paramw.b));
  }
  
  static a.d.s a(a.d.s params)
  {
    return new a.d.s(f(params.b()), f(params.c()));
  }
  
  static a.d.w[] b(a.d.w[] paramArrayOfw)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    if (paramArrayOfw == null) {
      return null;
    }
    do
    {
      for (int i1 = 0; i2 == 0; i1++)
      {
        if (i1 >= paramArrayOfw.length) {
          break;
        }
        if ((i3 == 0) && (i2 != 0)) {
          break label51;
        }
        paramArrayOfw[i1] = a(paramArrayOfw[i1]);
      }
    } while (i3 != 0);
    label51:
    return paramArrayOfw;
  }
  
  static kb a(kb paramkb)
  {
    return new kb(f(paramkb.b()), f(paramkb.c()), f(paramkb.e()), f(paramkb.f()));
  }
  
  static kb a(a.d.w[] paramArrayOfw, boolean paramBoolean)
  {
    int i1 = g.Cc;
    a.d.w localw1;
    a.d.w localw2;
    if (paramBoolean)
    {
      localw1 = new a.d.w(paramArrayOfw[0].a(), paramArrayOfw[0].b());
      localw2 = new a.d.w(paramArrayOfw[1].a(), paramArrayOfw[1].b());
      if (i1 != 0) {
        break label121;
      }
      if (g.Bc == 0) {}
    }
    else
    {
      localw1 = new a.d.w(paramArrayOfw[(paramArrayOfw.length - 1)].a(), paramArrayOfw[(paramArrayOfw.length - 1)].b());
      localw2 = new a.d.w(paramArrayOfw[(paramArrayOfw.length - 2)].a(), paramArrayOfw[(paramArrayOfw.length - 2)].b());
    }
    label121:
    if ((i1 != 0) || ((localw1.a() == localw2.a()) || (localw1.b() == localw2.b()))) {
      return new kb(localw1, localw2);
    }
    return null;
  }
  
  static Rectangle2D a(kb paramkb, double paramDouble)
  {
    return new Rectangle2D.Double(Math.min(paramkb.b(), paramkb.e()) - paramDouble, Math.min(paramkb.c(), paramkb.f()) - paramDouble, Math.abs(paramkb.e() - paramkb.b()) + 2.0D * paramDouble, Math.abs(paramkb.f() - paramkb.c()) + 2.0D * paramDouble);
  }
  
  static Rectangle2D a(double paramDouble1, double paramDouble2, double paramDouble3, double paramDouble4, double paramDouble5)
  {
    return new Rectangle2D.Double(paramDouble1 - paramDouble5, paramDouble2 - paramDouble5, paramDouble3 + 2.0D * paramDouble5, paramDouble4 + 2.0D * paramDouble5);
  }
  
  static a.d.n a(a.d.w paramw1, a.d.w paramw2, double paramDouble)
  {
    int i1 = g.Cc;
    if (i1 == 0)
    {
      if (a(paramDouble, 0.0D)) {
        return new a.d.n(paramw1, paramw2);
      }
      if (i1 != 0) {}
    }
    else if (a(paramw1.b(), paramw2.b()))
    {
      d1 = Math.min(paramw1.a(), paramw2.a());
      d2 = Math.max(paramw1.a(), paramw2.a());
      return new a.d.n(new a.d.w(d1 - paramDouble, paramw1.b()), new a.d.w(d2 + paramDouble, paramw1.b()));
    }
    double d1 = Math.min(paramw1.b(), paramw2.b());
    double d2 = Math.max(paramw1.b(), paramw2.b());
    return new a.d.n(new a.d.w(paramw1.a(), d1 - paramDouble), new a.d.w(paramw1.a(), d2 + paramDouble));
  }
  
  static Point2D a(kb paramkb1, kb paramkb2, boolean paramBoolean)
  {
    int i1 = g.Cc;
    if (i1 == 0) {
      if (!paramkb1.a(paramkb2)) {
        return null;
      }
    }
    double d1 = paramkb1.e() - paramkb1.b();
    double d2 = paramkb1.f() - paramkb1.c();
    double d3 = paramkb2.e() - paramkb2.b();
    double d4 = paramkb2.f() - paramkb2.c();
    double d5 = d3 * d2 - d4 * d1;
    if (i1 == 0) {
      if (d5 == 0.0D) {
        return null;
      }
    }
    double d6 = (d3 * (paramkb2.c() - paramkb1.c()) + d4 * (paramkb1.b() - paramkb2.b())) / d5;
    if (((i1 != 0) || (!paramBoolean)) && ((i1 != 0) || ((a(d6, 0.0D)) || (a(d6, 1.0D))))) {
      return null;
    }
    return new Point2D.Double(paramkb1.b() + d6 * d1, paramkb1.c() + d6 * d2);
  }
  
  static double[] a(kb paramkb, Collection paramCollection)
  {
    int i5 = g.Cc;
    int i4 = g.Bc;
    if (i5 == 0) {}
    boolean bool = paramkb.c() == paramkb.f();
    if (i5 == 0) {}
    int i1 = paramkb.b() == paramkb.e() ? 1 : 0;
    if (((i5 != 0) || (!bool)) && ((i5 != 0) || (i1 == 0))) {
      return new double[0];
    }
    ArrayList localArrayList = new ArrayList();
    Iterator localIterator = paramCollection.iterator();
    do
    {
      do
      {
        Point2D localPoint2D;
        do
        {
          kb localkb;
          int i2;
          int i3;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            localkb = (kb)localIterator.next();
            if (i5 == 0) {}
            i2 = localkb.c() == localkb.f() ? 1 : 0;
            if (i5 == 0) {}
            i3 = localkb.b() == localkb.e() ? 1 : 0;
          } while (((i5 == 0) && ((i2 == 0) && ((i5 == 0) && (i3 == 0)))) || ((i5 == 0) && ((bool) && ((i5 == 0) && (i2 != 0)))) || ((i5 == 0) && ((i1 != 0) && (i3 != 0))));
          localPoint2D = a(localkb, paramkb, true);
        } while (localPoint2D == null);
        if ((i5 != 0) || (i4 != 0)) {
          break label280;
        }
        localArrayList.add(new Double(a(localPoint2D, bool)));
      } while (i5 != 0);
    } while (i4 == 0);
    label280:
    return a(localArrayList);
  }
  
  static kb[] a(zc paramzc)
  {
    a.d.w localw1 = new a.d.w(paramzc.a(), paramzc.b());
    a.d.w localw2 = new a.d.w(paramzc.a() + paramzc.c(), paramzc.b());
    a.d.w localw3 = new a.d.w(paramzc.a() + paramzc.c(), paramzc.b() + paramzc.d());
    a.d.w localw4 = new a.d.w(paramzc.a(), paramzc.b() + paramzc.d());
    kb[] arrayOfkb = new kb[4];
    arrayOfkb[0] = new kb(localw1, localw2);
    arrayOfkb[1] = new kb(localw2, localw3);
    arrayOfkb[2] = new kb(localw4, localw3);
    arrayOfkb[3] = new kb(localw1, localw4);
    return arrayOfkb;
  }
  
  static a.d.w b(a.d.w paramw1, a.d.w paramw2, double paramDouble)
  {
    a.d.z localz = new a.d.z(paramw1, paramw2);
    if (g.Cc == 0) {
      if (localz.d() <= paramDouble) {
        return paramw2;
      }
    }
    localz.b((localz.d() - paramDouble) / localz.d());
    return a.d.z.a(paramw2, localz);
  }
  
  static double a(double paramDouble, int paramInt1, int paramInt2)
  {
    return a(paramDouble, paramInt1, paramInt2, null);
  }
  
  static double a(double paramDouble, int paramInt1, int paramInt2, boolean paramBoolean)
  {
    return a(paramDouble, paramInt1, paramInt2, paramBoolean ? Boolean.TRUE : Boolean.FALSE);
  }
  
  private static double a(double paramDouble, int paramInt1, int paramInt2, Boolean paramBoolean)
  {
    int i1 = g.Cc;
    double d1 = paramInt1;
    double d2 = paramInt2;
    double d3 = Math.floor((paramDouble - d1) / d2);
    double d4 = Math.floor(0.5D + d3 * d2 + d1);
    if ((i1 != 0) || (a(paramDouble, d4))) {
      return d4;
    }
    if ((i1 != 0) || (paramBoolean != null)) {
      return !paramBoolean.booleanValue() ? d4 : d4 + d2;
    }
    if (i1 == 0) {}
    return Math.abs(paramDouble - d4) < 0.5D * d2 ? d4 : d4 + d2;
  }
  
  static double a(double paramDouble1, int paramInt1, int paramInt2, double paramDouble2, double paramDouble3)
  {
    int i1 = g.Cc;
    double d = a(paramDouble1, paramInt1, paramInt2);
    if (i1 == 0) {
      if (d < paramDouble2) {
        d += paramInt2;
      }
    }
    if (i1 == 0)
    {
      if (d > paramDouble3) {
        d -= paramInt2;
      }
      if (i1 != 0) {}
    }
    else if (d < paramDouble2)
    {
      return (0.0D / 0.0D);
    }
    return d;
  }
  
  static double a(Point2D paramPoint2D, boolean paramBoolean)
  {
    return paramBoolean ? paramPoint2D.getX() : paramPoint2D.getY();
  }
  
  static double a(a.d.w paramw, boolean paramBoolean)
  {
    return paramBoolean ? paramw.a() : paramw.b();
  }
  
  static double[] a(Collection paramCollection)
  {
    int i3 = g.Cc;
    int i2 = g.Bc;
    double[] arrayOfDouble = new double[paramCollection.size()];
    int i1 = 0;
    do
    {
      Iterator localIterator = paramCollection.iterator();
      while (i2 == 0)
      {
        if (!localIterator.hasNext()) {
          break;
        }
        if ((i3 == 0) && (i2 != 0)) {
          break label76;
        }
        arrayOfDouble[i1] = ((Double)localIterator.next()).doubleValue();
        i1++;
      }
    } while (i3 != 0);
    label76:
    return arrayOfDouble;
  }
  
  class b_
  {
    private boolean a = true;
    private int c = 20;
    private int e = 3;
    
    b_() {}
    
    void a(b.d_ paramd_)
    {
      int m = g.Cc;
      int k = g.Bc;
      a.c.k localk = paramd_.d().c(bd.a);
      a.c.w localw = paramd_.h();
      label193:
      label218:
      label219:
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale = localw.d();
        int i = paramd_.d(localw.d()).size();
        int j = 0;
        bd localbd1 = new bd();
        Iterator localIterator;
        if (((m != 0) || (localk != null)) && ((m != 0) || (localk.get(locale) != null)))
        {
          bd localbd2 = (bd)localk.get(locale);
          localIterator = localbd2.b();
        }
        while (localIterator.hasNext())
        {
          ad localad = ((bd.e_)localIterator.next()).a();
          if (m != 0) {
            break label219;
          }
          if (k != 0) {
            break label218;
          }
          if (!localad.b())
          {
            if (m != 0) {
              break label193;
            }
            if (i > 1) {}
          }
          else
          {
            localbd1.a(localad, 1);
            if (k == 0) {
              continue;
            }
          }
          j |= localad.a();
          if (m != 0) {
            break label218;
          }
          if ((m != 0) || (k != 0)) {
            j = 255;
          }
        }
        if (i > 1) {
          a(paramd_.d(), locale, i * this.e, j, localbd1);
        }
        paramd_.a(locale, localbd1);
        localw.f();
      } while (k == 0);
    }
    
    void a(a.f.o paramo, e parame, int paramInt1, int paramInt2, bd parambd)
    {
      int k = g.Cc;
      int j = g.Bc;
      ArrayList localArrayList1 = new ArrayList();
      Object localObject1 = parame.h();
      do
      {
        do
        {
          if (localObject1 == null) {
            break;
          }
          localObject2 = b.a(paramo.n((d)localObject1).h(), true);
          if (j != 0) {
            break label118;
          }
          if (localObject2 != null) {
            localArrayList1.add(b.a((kb)localObject2));
          }
          localObject1 = ((d)localObject1).i();
        } while (j == 0);
      } while (k != 0);
      localObject1 = parame.i();
      label118:
      do
      {
        if (localObject1 == null) {
          break;
        }
        if (j != 0) {
          break label147;
        }
        localObject2 = b.a(paramo.n((d)localObject1).h(), false);
        if (localObject2 != null) {
          localArrayList1.add(b.a((kb)localObject2));
        }
        localObject1 = ((d)localObject1).j();
      } while (j == 0);
      label147:
      localObject1 = paramo.d(parame);
      Object localObject2 = paramo.o(parame);
      kb[] arrayOfkb = b.a((zc)localObject1);
      int i = 0;
      label172:
      if (i < arrayOfkb.length) {
        if ((b.m[i] & paramInt2) == 0) {}
      }
      label441:
      label464:
      label467:
      while (k != 0)
      {
        kb localkb = b.a(arrayOfkb[i]);
        if (k == 0) {}
        boolean bool = localkb.c() == localkb.f();
        if (k == 0) {}
        if (k == 0) {}
        double d1 = b.a(localkb.a(), !bool) - b.a((a.d.w)localObject2, !bool);
        double d2 = b.f(b.a(localkb.a(), bool));
        double d3 = b.f(b.a(localkb.d(), bool));
        double d4 = 0.2D / (d3 - d2);
        double[] arrayOfDouble = b.a(localkb, localArrayList1);
        ArrayList localArrayList2 = a(paramInt1, arrayOfDouble, d2, d3, bool);
        Iterator localIterator = localArrayList2.iterator();
        do
        {
          double d5;
          double d6;
          do
          {
            if (!localIterator.hasNext()) {
              break label467;
            }
            Double localDouble = (Double)localIterator.next();
            d5 = localDouble.doubleValue() - b.a((a.d.w)localObject2, bool);
            d6 = d4 * Math.abs(d5) + 0.2D;
            if (j != 0) {
              break;
            }
            if (!bool) {
              break label441;
            }
            parambd.a(ad.a(d5, d1, b.m[i], d6), 1);
            if (k != 0) {
              break label464;
            }
          } while (j == 0);
          parambd.a(ad.a(d1, d5, b.m[i], d6), 1);
        } while (j == 0);
        i++;
        if (k != 0) {
          break label172;
        }
        if (j == 0) {
          break;
        }
      }
    }
    
    private ArrayList a(int paramInt, double[] paramArrayOfDouble, double paramDouble1, double paramDouble2, boolean paramBoolean)
    {
      int i1 = g.Cc;
      int n = g.Bc;
      int[] arrayOfInt = a(paramArrayOfDouble, paramDouble1, paramDouble2, paramBoolean);
      int i = 0;
      int j = 0;
      do
      {
        do
        {
          if (j >= arrayOfInt.length) {
            break;
          }
          i += arrayOfInt[j];
          j++;
          if ((i1 == 0) && (n != 0)) {
            break label84;
          }
        } while (n == 0);
      } while (i1 != 0);
      j = Math.min(i, Math.min(this.c, paramInt));
      label84:
      ArrayList localArrayList1 = new ArrayList(j);
      double d1 = paramDouble1;
      int k = 0;
      do
      {
        if (k >= paramArrayOfDouble.length) {
          break;
        }
        if (n != 0) {
          break label274;
        }
        if (i <= 0) {
          break;
        }
        double d2 = paramArrayOfDouble[k];
        int m = (int)Math.ceil(j * arrayOfInt[k] / i);
        if ((i1 != 0) || (this.a)) {
          if (i1 != 0) {}
        }
        m = (m & 0x1) == 0 ? m + 1 : m;
        ArrayList localArrayList2 = a(m, d1, d2 - b.this.g(), paramBoolean);
        localArrayList1.addAll(localArrayList2);
        j -= localArrayList2.size();
        i -= arrayOfInt[k];
        d1 = d2 + b.this.g();
        k++;
      } while (n == 0);
      if (i1 == 0) {
        label274:
        localArrayList1.addAll(a(j, d1, paramDouble2, paramBoolean));
      }
      return localArrayList1;
    }
    
    ArrayList a(int paramInt, double paramDouble1, double paramDouble2, boolean paramBoolean)
    {
      int n = g.Cc;
      int m = g.Bc;
      if ((n != 0) || ((paramDouble2 < paramDouble1) || (paramInt <= 0))) {
        return new ArrayList(1);
      }
      ArrayList localArrayList = new ArrayList(paramInt);
      double d2;
      double d3;
      double d4;
      double d6;
      double d8;
      if ((n != 0) || (b.this.e()))
      {
        int i = (int)(paramBoolean ? b.this.s.I().a() : b.this.s.I().b());
        double[] arrayOfDouble = c(paramDouble1, paramDouble2, paramBoolean);
        d2 = arrayOfDouble[0];
        d3 = arrayOfDouble[1];
        d4 = arrayOfDouble[2];
        if (n == 0) {
          if (d4 < d3) {
            return localArrayList;
          }
        }
        int j = a(paramDouble1, paramDouble2, paramBoolean);
        if (n == 0) {
          if (this.a)
          {
            d6 = b.a(0.5D * (paramDouble1 + paramDouble2), i, b.this.d(), d3, d4);
            if (n == 0)
            {
              if (Double.isNaN(d6)) {
                return localArrayList;
              }
              localArrayList.add(new Double(d6));
            }
            d8 = paramInt == 1 ? d2 : d2 * Math.max(1.0D, Math.floor(Math.floor(0.5D * (j - 1)) / Math.ceil(0.5D * (paramInt - 1))));
            int k = 1;
            label389:
            do
            {
              if (localArrayList.size() >= paramInt) {
                break;
              }
              double d9 = d6 - d8 * k;
              if (n == 0) {
                if (paramDouble1 <= d9) {
                  localArrayList.add(new Double(Math.floor(d9 + 0.5D)));
                }
              }
              double d10 = d6 + d8 * k;
              if (n == 0) {
                if (d10 <= paramDouble2)
                {
                  if (n != 0) {
                    break label389;
                  }
                  if (localArrayList.size() < paramInt) {
                    localArrayList.add(new Double(Math.floor(d10 + 0.5D)));
                  }
                }
              }
              if (n == 0) {
                if (d9 < paramDouble1)
                {
                  if (n == 0) {
                    if (paramDouble2 < d10) {
                      break;
                    }
                  }
                }
                else {
                  k++;
                }
              }
            } while (m == 0);
          }
        }
        d6 = paramInt == 1 ? d2 : d2 * Math.max(1.0D, Math.floor((j - 1) / (paramInt - 1)));
        d8 = d3;
      }
      while (localArrayList.size() < paramInt) {
        if (n == 0)
        {
          if (d8 <= d4)
          {
            localArrayList.add(new Double(Math.floor(d8 + 0.5D)));
            d8 += d6;
          }
        }
        else if (m != 0)
        {
          double d1 = b.d(paramDouble1);
          d2 = b.c(paramDouble2);
          if (n == 0) {
            if (this.a)
            {
              d3 = 0.5D * (d1 + d2);
              localArrayList.add(new Double(b.e(d3)));
              d4 = Math.max(Math.floor((d2 - d1) / paramInt), b.this.g());
              d5 = 0.5D * (d2 - d1);
              double d7 = d4;
              do
              {
                if (localArrayList.size() >= paramInt) {
                  break;
                }
                if (n == 0)
                {
                  if (d7 > d5) {
                    break;
                  }
                  localArrayList.add(new Double(b.e(d3 + d7)));
                }
                if (n == 0)
                {
                  if (localArrayList.size() < paramInt) {
                    localArrayList.add(new Double(b.e(d3 - d7)));
                  }
                  d7 += d4;
                }
              } while (m == 0);
            }
          }
          d3 = (n != 0) || (paramInt == 1) ? b.this.g() : Math.max(Math.floor((d2 - d1) / (paramInt - 1)), b.this.g());
          d4 = b.e((d2 - d1) % d3);
          double d5 = d1 + 0.5D * d4;
          do
          {
            if (d5 > d2) {
              break;
            }
            if (m != 0) {
              break label812;
            }
            localArrayList.add(new Double(b.e(d5)));
            d5 += d3;
          } while (m == 0);
        }
      }
      label812:
      return localArrayList;
    }
    
    int[] a(double[] paramArrayOfDouble, double paramDouble1, double paramDouble2, boolean paramBoolean)
    {
      int k = g.Cc;
      int j = g.Bc;
      double d1 = Math.max(b.this.g(), 1.0D);
      int[] arrayOfInt = new int[paramArrayOfDouble.length + 1];
      double d2 = paramDouble1;
      int i = 0;
      do
      {
        if (i >= paramArrayOfDouble.length) {
          break;
        }
        double d3 = paramArrayOfDouble[i];
        if (k != 0) {
          break label125;
        }
        arrayOfInt[i] += a(d2, d3 - d1, paramBoolean);
        d2 = d3 + d1;
        i++;
        if (j != 0) {
          break label123;
        }
      } while (j == 0);
      if (k == 0) {
        arrayOfInt[(arrayOfInt.length - 1)] += a(d2, paramDouble2, paramBoolean);
      }
      label123:
      label125:
      return arrayOfInt;
    }
    
    int a(double paramDouble1, double paramDouble2, boolean paramBoolean)
    {
      int j = g.Cc;
      if (j == 0) {
        if (paramDouble2 < paramDouble1) {
          return 0;
        }
      }
      if (j == 0) {
        if (b.this.e())
        {
          double[] arrayOfDouble = c(paramDouble1, paramDouble2, paramBoolean);
          double d1 = arrayOfDouble[0];
          double d2 = arrayOfDouble[1];
          double d3 = arrayOfDouble[2];
          if (j == 0) {
            if (d3 < d2) {
              return 0;
            }
          }
          if (j == 0) {
            if (this.a)
            {
              int i = (int)(paramBoolean ? b.this.s.I().a() : b.this.s.I().b());
              double d4 = b.a(0.5D * (paramDouble1 + paramDouble2), i, b.this.d(), d2, d3);
              if (j == 0) {
                if (Double.isNaN(d4)) {
                  return 0;
                }
              }
              return 1 + (int)Math.floor((d3 - d4) / d1) + (int)Math.floor((d4 - d2) / d1);
            }
          }
          return 1 + (int)Math.floor((d3 - d2) / d1);
        }
      }
      if (j == 0) {
        if (this.a) {
          return 1 + 2 * (int)Math.floor(0.5D * (paramDouble2 - paramDouble1) / b.this.g());
        }
      }
      return 1 + (int)Math.floor((paramDouble2 - paramDouble1) / b.this.g());
    }
    
    private double[] c(double paramDouble1, double paramDouble2, boolean paramBoolean)
    {
      int i = (int)(paramBoolean ? b.this.s.I().a() : b.this.s.I().b());
      double[] arrayOfDouble = new double[3];
      arrayOfDouble[0] = Math.max(1.0D, Math.ceil(b.this.g() / b.this.d()) * b.this.d());
      arrayOfDouble[1] = b.a(paramDouble1, i, b.this.d(), true);
      arrayOfDouble[2] = b.a(paramDouble2, i, b.this.d(), false);
      return arrayOfDouble;
    }
  }
  
  static class a_
  {
    private final e a;
    private final e b;
    private final double d;
    private final ab e;
    
    static a_ a(a.f.o paramo, e parame, boolean paramBoolean)
    {
      int j = g.Cc;
      int i = g.Bc;
      ab localab = new ab();
      e locale = parame;
      d locald = c(paramo, locale, paramBoolean);
      if (locald != null)
      {
        locale = locald.a(locale);
        localab.add(locald);
        locald = c(paramo, locale, paramBoolean);
      }
      for (;;)
      {
        if ((j != 0) || (i == 0))
        {
          if (i == 0) {
            break;
          }
          if (j == 0) {
            if (localab.isEmpty()) {
              return new a_();
            }
          }
        }
      }
      return new a_(localab, parame, locale, paramo.o(parame).a(paramo.o(locale)));
    }
    
    private static d c(a.f.o paramo, e parame, boolean paramBoolean)
    {
      int j = g.Cc;
      int i = g.Bc;
      a.d.w localw1 = paramo.o(parame);
      m localm = parame.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.d.w localw2 = paramo.o(localm.a().a(parame));
        if ((j != 0) || ((!paramBoolean) || ((j != 0) || ((!b.a(localw1.b(), localw2.b())) || ((j != 0) || (localw1.a() >= localw2.a()))))))
        {
          if (j != 0) {
            continue;
          }
          if (!paramBoolean)
          {
            if (j != 0) {
              continue;
            }
            if (b.a(localw1.a(), localw2.a()))
            {
              if (j != 0) {
                continue;
              }
              if (localw1.b() >= localw2.b()) {}
            }
          }
        }
        else
        {
          return localm.a();
        }
        localm.f();
      } while (i == 0);
      return null;
    }
    
    private a_()
    {
      this.e = new ab();
      this.a = null;
      this.b = null;
      this.d = (-1.0D / 0.0D);
    }
    
    private a_(ab paramab, e parame1, e parame2, double paramDouble)
    {
      this.e = paramab;
      this.a = parame1;
      this.b = parame2;
      this.d = paramDouble;
    }
    
    ab a()
    {
      return this.e;
    }
    
    e b()
    {
      return this.a;
    }
    
    e d()
    {
      return this.b;
    }
    
    double e()
    {
      return this.d;
    }
    
    public String toString()
    {
      return "[first=" + this.a + " last=" + this.b + " length=" + this.d + "]";
    }
  }
  
  static class d_
    implements Comparable
  {
    private final a.f.o a;
    private final Object b;
    private long c;
    private final ab d;
    private final ab f;
    private final ab g;
    private final a.c.bb h;
    private final x j;
    private final x k;
    private final a.c.n l;
    private final a.c.n m;
    private final a.c.z n;
    private final HashSet o;
    
    d_(a.f.o paramo, Object paramObject)
    {
      this.a = paramo;
      this.b = paramObject;
      this.c = 0L;
      this.d = new ab();
      this.f = new ab();
      this.g = new ab();
      this.h = new a.c.bb();
      this.j = db.a();
      this.k = db.a();
      this.l = db.b();
      this.m = db.b();
      this.o = new HashSet();
      this.n = new a.c.z();
    }
    
    void a(d paramd, r paramr)
    {
      int i = g.Cc;
      if (i == 0)
      {
        if (a(paramd)) {
          throw new IllegalArgumentException("Edge is already part of this bus: " + paramd);
        }
        this.d.add(paramd);
      }
      if (i == 0) {
        if (paramr.d())
        {
          this.f.add(paramd);
          if (i != 0) {
            return;
          }
          if (g.Bc == 0) {
            break label91;
          }
        }
      }
      this.g.add(paramd);
      label91:
      a(paramd, paramr, true);
      a(paramd, paramr, false);
    }
    
    private void a(d paramd, r paramr, boolean paramBoolean)
    {
      int i = g.Cc;
      e locale = paramBoolean ? paramd.e() : paramd.f();
      Object localObject = paramBoolean ? paramr.b() : paramr.c();
      a(locale);
      b.c_ localc_ = a(locale, localObject);
      if (i == 0)
      {
        if (localc_ == null) {
          localc_ = new b.c_(locale, localObject);
        }
      }
      else
      {
        ((Map)this.j.get(locale)).put(localObject, localc_);
        this.n.add(localc_);
        this.o.add(localc_);
      }
      if (i == 0) {
        if (paramr.d())
        {
          this.o.remove(localc_);
          b.c_.access$502(localc_, paramBoolean ? b.a(this.a.r(paramd)) : b.a(this.a.s(paramd)));
        }
      }
      a.c.n localn = paramBoolean ? this.l : this.m;
      localn.a(paramd, localc_);
      b.c_.access$600(localc_).add(paramd);
      Collection localCollection = o.c(this.a, paramd, paramBoolean);
      localCollection = o.a(this.a, paramd, localCollection, paramBoolean);
      if (((i != 0) || (localCollection != null)) && ((i != 0) || (!localCollection.isEmpty()))) {
        b.c_.access$702(localc_, localCollection);
      }
    }
    
    private void a(e parame)
    {
      int i = g.Cc;
      if (i == 0) {
        if (!this.a.h(parame)) {
          throw new IllegalArgumentException("This graph does not contain the node " + parame.toString());
        }
      }
      if ((i != 0) || (!b(parame)))
      {
        this.h.add(parame);
        this.j.a(parame, new HashMap());
        a.d.w localw = ((a.f.o)parame.g()).r(parame);
        this.c += localw.a() + localw.b();
      }
    }
    
    private void a()
    {
      int i = g.Bc;
      this.g.addAll(this.f);
      this.f.clear();
      a.c.y localy = this.n.h();
      do
      {
        if (!localy.e()) {
          break;
        }
        b.c_ localc_ = (b.c_)localy.j();
        localc_.a(null);
        this.o.add(localc_);
        localy.f();
      } while (i == 0);
    }
    
    void a(e parame, bd parambd)
    {
      this.k.a(parame, parambd);
    }
    
    x b()
    {
      return this.k;
    }
    
    boolean a(d paramd)
    {
      return this.l.get(paramd) != null;
    }
    
    boolean b(e parame)
    {
      return this.j.get(parame) != null;
    }
    
    Collection d(e parame)
    {
      return ((Map)this.j.get(parame)).values();
    }
    
    b.c_ a(e parame, Object paramObject)
    {
      return (b.c_)((Map)this.j.get(parame)).get(paramObject);
    }
    
    b.c_ b(d paramd)
    {
      return (b.c_)this.l.get(paramd);
    }
    
    b.c_ c(d paramd)
    {
      return (b.c_)this.m.get(paramd);
    }
    
    Object c()
    {
      return this.b;
    }
    
    a.f.o d()
    {
      return this.a;
    }
    
    m e()
    {
      return this.d.l();
    }
    
    m f()
    {
      return this.f.l();
    }
    
    m g()
    {
      return this.g.l();
    }
    
    a.c.w h()
    {
      return this.h.l();
    }
    
    Collection i()
    {
      return Collections.unmodifiableCollection(this.n);
    }
    
    Collection j()
    {
      return Collections.unmodifiableCollection(this.o);
    }
    
    public int compareTo(Object paramObject)
    {
      int i1 = g.Cc;
      d_ locald_ = (d_)paramObject;
      int i = a.i.l.a(locald_.h.size(), this.h.size());
      if (i1 == 0) {
        if (i != 0) {
          return i;
        }
      }
      if (i1 == 0) {}
      if (i1 == 0) {}
      return this.c < locald_.c ? -1 : this.c == locald_.c ? 0 : 1;
    }
    
    public String toString()
    {
      return "[n=" + this.h.size() + " e=" + this.d.size() + " movable=" + this.o.size() + "]";
    }
  }
  
  static class c_
  {
    private final e a;
    private final Object b;
    private final ab c;
    private final ab d;
    private final ab f;
    private Collection g;
    private a.d.w h;
    
    c_(e parame, Object paramObject)
    {
      this.a = parame;
      this.b = paramObject;
      this.f = new ab();
      this.g = null;
      this.h = null;
      this.c = new ab();
      this.d = new ab();
    }
    
    Object a()
    {
      return this.b;
    }
    
    e b()
    {
      return this.a;
    }
    
    ab c()
    {
      return this.f;
    }
    
    Collection d()
    {
      return this.g;
    }
    
    a.d.w e()
    {
      return this.h;
    }
    
    void a(a.d.w paramw)
    {
      this.h = paramw;
    }
    
    m f()
    {
      return this.c.l();
    }
    
    m g()
    {
      return this.d.l();
    }
    
    ab h()
    {
      return this.d;
    }
    
    d i()
    {
      return this.d.m();
    }
    
    void a(Comparator paramComparator)
    {
      this.c.a(paramComparator);
      this.d.a(paramComparator);
    }
    
    v a(d paramd)
    {
      this.c.add(paramd);
      return this.d.b(paramd);
    }
    
    void a(v paramv)
    {
      this.d.h(paramv);
    }
    
    boolean j()
    {
      int i = g.Bc;
      a.f.o localo = (a.f.o)this.a.g();
      a.d.w localw1 = b.a(localo.s(this.c.m()));
      m localm = this.c.l();
      do
      {
        if (!localm.e()) {
          break;
        }
        a.d.w localw2 = b.a(localo.s(localm.a()));
        if (i != 0) {
          break label91;
        }
        if (!localw1.equals(localw2)) {
          return false;
        }
        localm.f();
      } while (i == 0);
      label91:
      return true;
    }
    
    public String toString()
    {
      return "[node=" + this.a + " id=" + this.b + "]";
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.l.b

 * JD-Core Version:    0.7.0.1

 */